package com.globallogic.model.transferobject;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import com.globallogic.model.entity.User;

@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.FIELD)
public class UserTo {

	public UserTo() {
		name = "";
		fullName = "";
		email = "";
		notes = "";
	}

	public void setName(String value) {
		if (null != value) {
			this.name = value;
		}
	}

	public String getName() {
		return this.name;
	}

	public void setPassword(String value) {
		this.password = value;
	}

	public String getPassword() {
		return this.password;
	}

	public void setFullName(String value) {
		if (null != value) {
			this.fullName = value;
		}
	}

	public String getFullName() {
		return this.fullName;
	}

	public void setEmail(String value) {
		if (null != value) {
			this.email = value;
		}
	}

	public String getEmail() {
		return this.email;
	}

	public void setNotes(String value) {
		if (null != value) {
			this.notes = value;
		}
	}

	public String getNotes() {
		return this.notes;
	}

	public void setIsAdmin(boolean value) {
		this.isAdmin = value;
	}

	public boolean getIsAdmin() {
		return this.isAdmin;
	}

	public void setId(int value) {
		this.id = value;
	}

	public int getId() {
		return this.id;
	}

	public User getEntity() {

		User entity = new User();
		entity.setName(name);
		entity.setFullName(fullName);
		entity.setEmail(email);
		entity.setIsAdmin(isAdmin);
		entity.setNotes(notes);
		entity.setPassword(password);
		entity.setId(id);
		return entity;
	}

	@XmlElement(required = true)
	private String name;

	@XmlTransient
	private String password;

	@XmlElement(required = true)
	private String fullName;

	@XmlElement(required = true)
	private String email;

	@XmlElement(required = false)
	private String notes;

	@XmlElement(required = true)
	private boolean isAdmin;

	@XmlElement(required = true)
	private int id;

}
